ITK Programmer's Guide


 

Table of contents | Intro | General | TCP Low Level | TCP High Level | UDP | DNS | PPP
Encoding/Decoding | Internet Config | Goodies | Cryptography | Appendix

 

Chapter 7 : PPP control routines

   

   

Chapter contents:


About this chapter...

This chapter describes PPP related routines that can be used to control the PPP layers.

Note:

PPP routines are not supported in the Windows version of ITK.
PPP routine are compatible with OT/PPP, ARA 3.0 and FreePPP v2.6 and above.


ITK_PPPStatus

Syntax:

result := ITK_PPPStatus


Description:

Returns the current status of PPP.


Params:

In/Out

Parameter

Type

   

Example or note

<-

result

Longint

Current PPP status

0 = not connected
1 = connected
negative = PPP not installed


Example:

If (ITK_PPPStatus=0) ` check if PPP is connected
  CONFIRM("Are you sure you want to connect ?")
  $ok := ok
  If (ok=1)
    $err := ITK_PPPOpen
    If ($err#0)
      $ok := 0
    End If
  End If 
Else
  $ok := 1
End If
 If ($ok=1)
  $stream := ITK_TCPOpen("www.domain.com";80)
  ...
Back to top


ITK_PPPOpen

Syntax:

result := ITK_PPPOpen


Description:

Opens PPP connection.


Params:

In/Out

Parameter

Type

   

Example or note

<-

result

Longint

   

0 = connected
-1 = connection failed
negative = PPP not used


Example:

$err := ITK_PPPOpen ` Will open the PPP connection
Back to top


ITK_PPPClose

Syntax:

result := ITK_PPPClose(closeType)


Description:

Closes PPP connection.
The parameter can be used to specify hard or soft close.


Params:

In/Out

Parameter

Type

   

Example or note

->

 

closeType

 

Longint

 

Type of close (hard or soft).

0 = soft close
1 = hard close

<-

result

Longint

Result code

Currently always returns 0


Example:

If (ITK_PPPStatus=1)
  CONFIRM("Do you want to close your PPP connection ?")
  If (ok=1)
    $err := ITK_PPPClose   End If
End If
Back to top


CQ/27-Nov-97